import useResetTableData from './sub/useResetTableData'
import useNewFileNameTransfer from './sub/useNewFileNameTransfer'
import useRuleTransfer from './sub/useRuleTransfer'
import useSerialNumberTransfer from './sub/useSerialNumberTransfer'
import useSuffixFileNameTransfer from './sub/useSuffixFileNameTransfer'
import useInsertNameTransfer from './sub/useInsertNameTransfer'
import useReplaceContentTransfer from './sub/useReplaceContentTransfer'
import useContentSwapTransfer from './sub/useContentSwapTransfer'
import useContentRemoveTransfer from './sub/useContentRemoveTransfer'

export default function useTransferName(callback: () => ITableDataItem[]) {
  // tableData 数据重置
  const { resetTableDataList } = useResetTableData(callback)
  // 新文件名
  const { newFileNameTransfer } = useNewFileNameTransfer(callback)
  // 大小写转换、简繁体转换、中文转拼音
  const { ruleTransfer } = useRuleTransfer(callback)
  // 编号设置
  const { serialNumberTransfer } = useSerialNumberTransfer(callback)
  // 扩展名
  const { suffixFileNameTransfer } = useSuffixFileNameTransfer(callback)
  // 插入内容
  const { insertNameTransfer } = useInsertNameTransfer(callback)
  // 替换内容、替换内容
  const { replaceContentTransfer } = useReplaceContentTransfer(callback)
  // 根据分割符对调内容
  const { contentSwapTransfer } = useContentSwapTransfer(callback)
  // 删除样式
  const { contentRemoveTransfer } = useContentRemoveTransfer(callback)

  return {
    resetTableDataList,
    newFileNameTransfer,
    ruleTransfer,
    serialNumberTransfer,
    suffixFileNameTransfer,
    insertNameTransfer,
    replaceContentTransfer,
    contentSwapTransfer,
    contentRemoveTransfer
  }
}
